from translate import Translator

'''每天限制在3000次'''

def translate_content_ch(content):
    # 实现英文转中文
    translator = Translator(to_lang='chinese')
    translation = translator.translate(content)
    return translation


def translate_content_en(content):
    # 实现中文转英文
    translator = Translator(from_lang='chinese', to_lang='english')
    translation = translator.translate(content)
    return translation

# str = 'hello world'
# tran = translate_content_ch(str)
# print(tran)